package com.tfswx.jcyw.sqlmodel.api.bean.table.expression;

import com.tfswx.jcyw.sqlmodel.api.bean.table.Expression;
import lombok.Data;

/**
 * @author 张述江
 * @date 2023/9/15
 */
@Data
public class Parenthesis implements Expression {
    private Expression expression;

    public Parenthesis(Expression expression) {
        this.expression = expression;
    }

    public Parenthesis() {
        this(null);
    }

    @Override
    public String toString() {
        return "(" + (expression != null ? expression : "") + ")";
    }
}
